package com.sausageking.client;

import com.google.appengine.api.datastore.EntityNotFoundException;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.sausageking.shared.Merchant;
import com.sausageking.shared.YearPassCodes;

@RemoteServiceRelativePath("merchant")
public interface MerchantService extends RemoteService {
  Merchant insert(Merchant merchant) throws IllegalArgumentException;
  Merchant update(Merchant merchant) throws IllegalArgumentException;
  Merchant getByEmail(String email) throws IllegalArgumentException;
  Merchant getById(Long id) throws IllegalArgumentException,
      EntityNotFoundException;

  YearPassCodes getPassCodeBook(String merchant, int year)
      throws EntityNotFoundException;
}
